//
//  EnemyPrototypeParser.h
//  airfight
//
//  Created by aaron more on 12-9-10.
//  Copyright (c) 2012年 moonriver. All rights reserved.
//

#ifndef airfight_EnemyPrototypeParser_h
#define airfight_EnemyPrototypeParser_h

#include "cocos2d.h"
#include "BaseXMLParser.h"
#include "EnemyPrototypes.h"
#include "Enemy.h"
#include "Bullet.h"

USING_NS_CC;



class EnemyPrototypeParser : public BaseXMLParser
{
private:
    std::string startXMLElement;
    std::string endXMLElement;
    std::string currentString;
    bool isStart;
    Enemy* currentEnemy;
    
public:
    EnemyPrototypes* prototypes;
    
public:
    EnemyPrototypeParser();
    virtual ~EnemyPrototypeParser();
    static EnemyPrototypeParser * formatWithXMLFile(const char *xmlFile);
    virtual void internalInit(const char* tmxFileName);
    
    virtual void startElement(void *ctx, const char *name, const char **atts);
    virtual void endElement(void *ctx, const char *name);
    virtual void textHandler(void *ctx, const char *s, int len);
    
};

#endif
